package cn.yunhe.springboot_shiro.service.impl;

import cn.yunhe.springboot_shiro.dao.UserMapper;
import cn.yunhe.springboot_shiro.entity.User;
import cn.yunhe.springboot_shiro.service.IUserService;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;

@Getter
@Setter
@Service
public class UserServiceImpl implements IUserService {
    @Autowired
    private UserMapper userMapper;


    @Override
    public User login(String name) {
        return userMapper.login(name);
    }

    @Override
    public Set<String> getRoles(String name) {
        return userMapper.getRoles(name);
    }

    @Override
    public Set<String> getPermission(String name) {
        return userMapper.getPermissions(name);
    }
}
